<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="utf-8">
    <title>优惠券列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <meta http-equiv="Pragma"    content="no-cache"/>
    <meta name="referrer" content="never">
    <meta http-equiv="Cache-Control"    content="no-cache"/>
     
    <meta http-equiv="Expires"    content="0"/>

    <link rel="stylesheet" href="/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="/layui/style/admin.css" media="all"/>

</head>
<body class="childrenBody">

<input type="hidden" name="activityId" id="activityId" th:value="${activityId}"/>
<table class="layui-hide" id="card_info_table" lay-filter="card_info_table"></table>

<div id="add_card_info_win" style="display: none;">
    <form id="cpn_card_info_form" class="layui-form" action="" lay-filter="cpn_card_info_form">
        <input type="hidden" name="id" id="id"/>

        <div class="layui-form-item">
            <label class="layui-form-label">卡券名(最多9个汉字):<span style="color: red">*</span></label>
            <div class="layui-input-block">
                <input type="text" name="title" id="title" placeholder="请输入卡卷名 如：全场8折折扣券" required lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>

        <!--    默认卡卷背景颜色 蓝色-->
        <input type="hidden" id="color" name="color" value="Color030">

        <div class="layui-form-item">
            <label class="layui-form-label" style="margin-right: -110px">使用提示语(最多16个汉字):<span style="color: red">*</span></label>
            <div class="layui-input-block">
                <input type="text" name="notice" id="notice" placeholder="如：请出示二维码" required lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>

        <!--选中固定时长显示-->
        <div class="layui-form-item">
            <label class="layui-form-label">自领取后有效天数:<span style="color: red">*</span></label>
            <div class="layui-input-block">
                <input type="number" name="fixed_term" id="fixed_term" placeholder="请输入天数" value="30" autocomplete="off"
                       class="layui-input" disabled="disabled">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">自领取后生效天数(0为立即生效):<span style="color: red">*</span></label>
            <div class="layui-input-block">
                <input type="number" name="fixed_begin_term" id="fixed_begin_term" placeholder="请输入天数" value="0"
                       autocomplete="off" class="layui-input" disabled="disabled">
            </div>
        </div>

<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">每人领取数量:<span style="color: red">*</span></label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="number" name="get_limit" id="get_limit" placeholder="请输入" autocomplete="off"-->
<!--                       class="layui-input">-->
<!--            </div>-->
<!--        </div>-->

<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">每人使用数量:<span style="color: red">*</span></label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="number" name="use_limit" id="use_limit" placeholder="请输入" autocomplete="off"-->
<!--                       class="layui-input">-->
<!--            </div>-->
<!--        </div>-->

        <div class="layui-form-item">
            <label class="layui-form-label">指定可用商品:</label>
            <div class="layui-input-block">
                <input type="text" name="accept_category" id="accept_category" placeholder="请输入" autocomplete="off"
                       class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">指定不可用商品:</label>
            <div class="layui-input-block">
                <input type="text" name="reject_category" id="reject_category" placeholder="请输入" autocomplete="off"
                       class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="editOk">保存信息</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>

    </form>
</div>

<script type="text/javascript" src="/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/js/MathUtils.js"></script>
<script src="/js/cpn/cpn_card_info.js"></script>

<script type="text/html" id="OptData">

    {{#  if( d.discount < d.service_fee ){ }}
    <a href="#" class="layui-btn layui-btn-xs" lay-event="modify_card">编辑信息</a>
    {{#  } }}

    {{#  if( d.discount < d.service_fee && d.state == 0){ }}
    <a href="#" class="layui-btn layui-btn-xs" lay-event="start_card">立即制券</a>
    {{#  } }}
</script>

</body>
</html>